domain. Otherwise, when running a debug=y xen, we will get a assertion
failure in vmx_request_clear_vmcs(), since some vcpus may be not
initialized for HVM use yet.
Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
for_each_vcpu ( d, v )
{
+ if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+ continue;
#if 0
/* Memory leak by not freeing this. XXXKAF: *Why* is not per core?? */
free_host_save_area(v->arch.hvm_svm.host_save_area);
for_each_vcpu ( d, v )
{
+ if ( !test_bit(_VCPUF_initialised, &v->vcpu_flags) )
+ continue;
vmx_request_clear_vmcs(v);
destroy_vmcs(&v->arch.hvm_vmx);
free_monitor_pagetable(v);